import { savePropertyMetadata } from '@midwayjs/core';


export function Role(roleName: string | string[]): MethodDecorator {
  return (target, propertyKey) => {
    roleName = [].concat(roleName);
    // 只保存元数据
    savePropertyMetadata('role:name', roleName, target, propertyKey);
  };
}
